package com.raining.inningz.custom.validator.customValidator;

import java.util.regex.Pattern;

import android.content.Context;

import com.raining.inningz.R;
import com.raining.inningz.custom.validator.AbstractValidator;


public class CommonErrMsgValidator extends AbstractValidator {

	private int mErrorMessage = R.string.validator_empty;
			
			
	private boolean condition;

    public CommonErrMsgValidator(Context c, int errorMessage,boolean condition) {
        super(c);
        mErrorMessage = errorMessage;
        this.condition=condition;
    }

	@Override
	public boolean isValid(String value) {
		
			return condition;
		
	}

	@Override
	public String getMessage() {
		return mContext.getString(mErrorMessage);
	}

}
